package com.andon.springboot.seed.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author: baiwenlong
 * created on: 2018/11/11 8:33 PM
 * description: mybatis-plus 配置
 */

@EnableTransactionManagement
@Configuration
@MapperScan("com.andon.springboot.seed.dao")
public class MybatisPlusConfig {

    /**
     * 1.分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
